package Application.FirstApplication.view.ui
{
	import flash.display.Sprite;
	import flash.events.Event;
	
	import unit4399.unit4399.events.SaveEvent;

	public class Login extends Sprite
	{
		public static var serviceHold:* = null;  
		public var logInfo:Object;
		
		public function Login() 
		{
//			logInfo = serviceHold.isLog;
			
//			stage.addEventListener("logreturn",saveProcess); 
//			stage.addEventListener("userLoginOut",onUserLogOutHandler,false,0,true); 
		}
		
		public function setHold(hold:*):void
		{ 
			serviceHold = hold;  
			// 如果已经登录 logInfo =  {uid:439911,name:nickName};
			// 如果没有登录 logInfo = null; 

			
			if(serviceHold)
			{  
				serviceHold.showLogPanel();
			} 

		} 
		
		private function saveProcess(e:SaveEvent):void
		{ 
			switch(e.type)
			{          
				case  "logreturn":             
						// 登录完成发出的事件           
						// e.ret =  {uid:439911,name:nickName};        
				break;   
			}  
		} 
		
		private function onUserLogOutHandler(evt:Event):void
		{ 
			trace( "用户退出登录了" ); 
		} 


	}
}